package com.ems.dao.supers.action;

import com.ems.pojo.permission.Action;
import com.ems.pojo.permission.GroupAction;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther: 伟伟
 * @Date: 2019/10/5
 * @Description: 描述
 * @Version: 1.0
 */
public interface GroupActionDao {
    //为指定角色添加权限
    public int addGroupAction(GroupAction groupAction);

    //根据校色id和权限id查询查询该表中是否已有父权限
    public GroupAction findGroupActionByGrIdAndActionId(@Param("gr_id") int gr_id, @Param("action_id") int action_id);

    //为指定的角色删除权限
    public void deleteGroupAction(GroupAction groupAction);

    //根据角色id查询该角色下面的所有权限
    public List<GroupAction> findAllActionByGroupId(int gr_id);

    public List<GroupAction> findAllChildPermission(@Param("gr_id") int gr_id,@Param("childrenActionList")List<Action> childrenActionList);

    //根据权限id批量进行删除
    public void batchActionByActionId(String ids);
}
